//
//  AnchorGroup.swift
//  DYZB
//
//  Created by 1 on 16/9/19.
//  Copyright © 2016年 小码哥. All rights reserved.
//

import UIKit

class AnchorGroup: BaseGameModel {
    /// 该组中对应的房间信息
    var room_list : [[String : NSObject]]? {
        didSet {
            guard let room_list = room_list else { return }
            for dict in room_list {
                let tmpModel = AnchorModel()
                tmpModel.obtainRealValue(dict: dict)
                anchors.append(tmpModel)
            }
        }
    }
    /// 组显示的图标
    var icon_name : String = "home_header_normal"
    
    /// 定义主播的模型对象数组
    lazy var anchors : [AnchorModel] = [AnchorModel]()

    override func obtainRealValue(dict: [String : Any]) {
        super.obtainRealValue(dict: dict)
        
        icon_name = dict["icon_name"] as! String
        room_list = dict["room_list"] as? [[String : NSObject]]
    }
    
//    override init(dict: [String : Any]) {
//        super.init(dict: dict)
//
//        icon_name = dict["icon_name"] as! String
//        room_list = dict["room_list"] as? [[String : NSObject]]
//    }
    
//    override func setValue(_ value: Any?, forUndefinedKey key: String) {}
}
